import request from '@/router/axios';
import {downloadExcel} from '@/router/axios';
import {formatCondition} from '@/util/util';
//单条查询
export const queryBizApparchOutSystem = (params) => {
  params.head.transCode = 'queryBizApparchOutSystem';
  return request({
    url: '/biz/apparch/bizApparchOutSystem/queryBizApparchOutSystem',
    method: 'post',
    data: params
  })
}
//多条列表查询，支持条件查询
export const queryBizApparchOutSystemListPage = (params) => {
  params.head.transCode = 'queryBizApparchOutSystemListPage';
  return request({
    url: '/biz/apparch/bizApparchOutSystem/queryBizApparchOutSystemListPage',
    method: 'post',
    data: params
  })
}
//新增单条记录
export const saveBizApparchOutSystem = (params) => {
  params.head.transCode = 'saveBizApparchOutSystem';
  return request({
    url: '/biz/apparch/bizApparchOutSystem/saveBizApparchOutSystem',
    method: 'post',
    data: params
  })
}
//新增多条记录
export const saveBizApparchOutSystemList = (params) => {
  params.head.transCode = 'saveBizApparchOutSystemList';
  return request({
    url: '/biz/apparch/bizApparchOutSystem/saveBizApparchOutSystemList',
    method: 'post',
    data: params
  })
}
//新增或修改单条记录
export const saveOrUpdateBizApparchOutSystem = (params) => {
  params.head.transCode = 'saveOrUpdateBizApparchOutSystem';
  return request({
    url: '/biz/apparch/bizApparchOutSystem/saveOrUpdateBizApparchOutSystem',
    method: 'post',
    data: params
  })
}


//新增或修改单条记录
export const saveOrUpdateBizApparchOutSystemList = (params) => {
  params.head.transCode = 'saveOrUpdateBizApparchOutSystemList';
  return request({
    url: '/biz/apparch/bizApparchOutSystem/saveOrUpdateBizApparchOutSystemList',
    method: 'post',
    data: params
  })
}

//修改单条记录
export const updateBizApparchOutSystem = (params) => {
  params.head.transCode = 'updateBizApparchOutSystem';
  return request({
    url: '/biz/apparch/bizApparchOutSystem/updateBizApparchOutSystem',
    method: 'post',
    data: params
  })
}

//删除单条记录
export const deleteBizApparchOutSystem = (params) => {
  params.head.transCode = 'deleteBizApparchOutSystem';
  return request({
    url: '/biz/apparch/bizApparchOutSystem/deleteBizApparchOutSystem',
    method: 'post',
    data: params
  })
}

//删除多条记录
export const deleteBizApparchOutSystemList = (params) => {
  params.head.transCode = 'deleteBizApparchOutSystemList';
  return request({
    url: '/biz/apparch/bizApparchOutSystem/deleteBizApparchOutSystemList',
    method: 'post',
    data: params
  })
}
//导出excel
export const exportBizApparchOutSystemExcel = (params) => {
  downloadExcel({
    url: '/biz/apparch/bizApparchOutSystem/excelDownload/exportBizApparchOutSystemExcel',
    method: 'get',
    data: 
    {
      tenantId: params.head.tenantId,
      orders:'',
      condition: formatCondition(params.body.sqlCondition)
    }
  })
}
